package cn.tedu.ivos.vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class VehicleSaveParam {

    @ApiModelProperty(value = "服装id")
    private Long id;

    @ApiModelProperty(value = "服装品牌")
    private String brand;

    @ApiModelProperty(value = "服装编号")
    private String license;

    @ApiModelProperty(value = "服装型号")
    private String model;

    @ApiModelProperty(value = "服装识别码")
    private String code;

    @ApiModelProperty(value = "服装材库存")
    private String displacement;

    @ApiModelProperty(value = "服装类型")
    private String type;

    @ApiModelProperty(value = "服装颜色")
    private String color;

    @ApiModelProperty(value = "服装数量")
    private String kilometers;

    @ApiModelProperty(value = "服装出库时间")
    //前端传过来的日期2020-1-1是String类型
    //如果想要转换为Date类型，需要使用@DateTimeFormat注解进行转换
    //否则会出现400 TypeMismatch类型不匹配异常
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date regTime;

    @ApiModelProperty(value = "服装购买时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date buyTime;

    @ApiModelProperty(value = "服装购买价格")
    private String price;

    @ApiModelProperty(value = "服装材质")
    private String batteryType;

    //包括上面的车辆id都是更新时才会用到,新增车辆时这三个属性的值是null
    @ApiModelProperty(value = "电子围栏绑定状态")
    private String geofenceBindStatus;

    @ApiModelProperty(value = "电子围栏id")
    private Long geofenceId;

    @ApiModelProperty(value = "服装状态")
    private String status;
}
